<template>
	<view class="index">
        分享
        <!-- #ifdef APP-PLUS-->
            <button type="primary" @click="share">分享</button>
        <!-- #endif-->
	</view>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		onLoad() {
		},
		methods: {
            share:function(){
                uni.share({
                    provider: "weixin",
                    scene: "WXSceneSession",
                    type: 1,
                    summary: "我正在使用HBuilderX开发uni-app，赶紧跟我一起来体验！",
                    success: function (res) {
                        console.log("success:" + JSON.stringify(res));
                    },
                    fail: function (err) {
                        console.log("fail:" + JSON.stringify(err));
                    }
                });
            },
		},
        onShareAppMessage:function(){
            return {
                title:"朋友们",
                path:"pages/index/index"
            }
        }
	
    }
</script>

<style scoped lang="scss">
	
</style>
